package com.demo02_interaction.client;

import com.demo02_interaction.bean.VideoDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "video-service", path = "/api/internal/videos", fallbackFactory = VideoServiceClientFallbackFactory.class)
public interface VideoServiceClient {
    
    @GetMapping("/{videoId}")
    VideoDTO getVideoById(@PathVariable("videoId") Long videoId);
    
    @GetMapping("/{videoId}/exists")
    Boolean checkVideoExists(@PathVariable("videoId") Long videoId);
    
    @PostMapping("/{videoId}/update-like-count")
    void updateLikeCount(@PathVariable("videoId") Long videoId, @RequestParam("delta") int delta);
}
